# Contributor: Alex Yam <alex@alexyam.com>
# Maintainer: Alex Yam <alex@alexyam.com>
pkgname=ircd-hybrid
pkgver=8.2.43
pkgrel=0
pkgdesc="lightweight and high-performance internet relay chat daemon (ircd)"
url="https://github.com/ircd-hybrid/ircd-hybrid/"
arch="all"
license="GPL-2.0-or-later"
makedepends="openssl-dev>3"
source="$pkgname-$pkgver.tar.gz::https://github.com/ircd-hybrid/ircd-hybrid/archive/$pkgver.tar.gz"
subpackages="$pkgname-doc"
options="!check" # no test suite

build() {
	./configure \
		--build="$CBUILD" \
		--host="$CHOST" \
		--prefix=/usr \
		--bindir=/usr/bin \
		--sbindir=/usr/sbin \
		--libexecdir=/usr/libexec \
		--sysconfdir=/etc/ircd-hybrid \
		--sharedstatedir=/var/lib/ircd-hybrid/com \
		--localstatedir=/var/lib/ircd-hybrid \
		--runstatedir=/var/lib/ircd-hybrid/run \
		--libdir=/usr/lib \
		--includedir=/usr/include \
		--oldincludedir=/usr/include \
		--datarootdir=/usr/lib \
		--infodir=/usr/share/man \
		--localedir=/usr/lib/ircd-hybrid/locale \
		--mandir=/usr/share/man \
		--docdir=/usr/share/ircd-hybrid/doc
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
108ee77e18f3eeb23c960aeaf90b7a0a31d534333df6064be80d93cbe52696812f93af36e53be5df126a3db1587aabda699934f412f6a2b54972d86590f6e40c  ircd-hybrid-8.2.43.tar.gz
"
